In [7]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [8]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [9]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [10]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [11]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [12]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [13]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [14]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [15]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [16]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [17]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab05.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab05.py:44: RuntimeWarning: divide by zero encountered in double_scalars
turning = (v0/v_list[-2] < 0.0)
In [18]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 10')
2.5025864848083885 2.5036274076761975
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
1.6700847418249443 1.674165797300528
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
1.2555006764821623 1.2598267915100132
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
1.007824640651541 1.009577543176985
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
0.8429992525831275 0.8426868158909813
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
0.7254922074480112 0.7236414065808147
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:106: UserWarning: Matplotlib is currently using module://ipykernel.pylab.backend_inline, which is a non-GUI backend, so cannot show the figure.
fig1.show()
/Users/amandaash/Desktop/PHYS_3210/Week 10/E21.py:109: RuntimeWarning: divide by zero encountered in log10
stability = -np.log10(np.abs((E_tot-E_tot[0])/E_tot[0]))
In [19]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 0.683730225975385 N
In [20]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 2.6810623217992444 N
In [21]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 2.6810623217992444 N
In [22]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 2.6810623217992444 N
In [23]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 2.6810623217992444 N
In [24]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 2.6810623217992444 N
In [25]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [26]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [27]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [28]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [29]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [30]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [31]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
In [32]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
Traceback (most recent call last):
File "<ipython-input-32-43bbbc208fdb>", line 1, in <module>
runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py", line 161, in <module>
natural_period, natural_frequency = find_period(v_natural)
TypeError: find_period() missing 1 required positional argument: 'time_step'
In [33]:
In [33]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Reloaded modules: __mp_main__
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
Traceback (most recent call last):
File "<ipython-input-33-43bbbc208fdb>", line 1, in <module>
runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py", line 161, in <module>
natural_period, natural_frequency = find_period(v_natural)
TypeError: find_period() missing 1 required positional argument: 'time_step'
In [34]:
In [34]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [35]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [36]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [37]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [38]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [39]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [40]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
3.162464922075491
In [41]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
3.162464922075491
In [42]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
2.679168218991807
In [43]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
Traceback (most recent call last):
File "<ipython-input-43-43bbbc208fdb>", line 1, in <module>
runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 827, in runfile
execfile(filename, namespace)
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/spyder_kernels/customize/spydercustomize.py", line 110, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py", line 158, in <module>
x_natural, v_natural, t_natural = harmonic_oscillator_friction_beta(p_value,k_constant,v_initial,x_initial,mass,dt,t_initial,t_final,0,0,0)
File "/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py", line 24, in harmonic_oscillator_friction_beta
if np.isclose(v,0, atol = 10**-5):
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/numpy/core/numeric.py", line 2523, in isclose
if all(xfin) and all(yfin):
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2245, in all
return _wrapreduction(a, np.logical_and, 'all', axis, None, out, keepdims=keepdims)
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 84, in _wrapreduction
return reduction(axis=axis, out=out, **passkwargs)
File "/Users/amandaash/anaconda3/lib/python3.7/site-packages/numpy/core/_methods.py", line 46, in _all
return umr_all(a, axis, dtype, out, keepdims)
KeyboardInterrupt
In [44]:
In [44]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
3.162464922075491
In [45]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
3.162464922075491
In [46]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
Static Friction failure, F_f = 4.4145 N, F_spring = 1.1127872145355915 N
3.162464922075491
In [47]: runfile('/Users/amandaash/Desktop/PHYS_3210/Week 11/Lab_5.py', wdir='/Users/amandaash/Desktop/PHYS_3210/Week 11')
3.162464922075491
In [48]: 0.1/(2*np.pi)